﻿@model  NCP.Recruiting.WebApp.Models.ResumeCondtionModel
@{
    var actionName = ViewContext.RouteData.Values["action"] == null ? "" : ViewContext.RouteData.Values["action"].ToString();
}
<script type="text/javascript">
    $(function () {
        $("#btnSearch").bind("click", function () {
            if ($('#IsSaveWhenSearch').prop('checked') && $('#txtSearchName').val() == "") {
                alert('请输入搜索器名称！');
                return false;
            }
            iniJobTypeListString();
        });

        $('#btnSave').bind("click", function () {
            if ($('#txtSearchName').val() == "") {
                alert('请输入搜索器名称！');
                return false;
            }
            iniJobTypeListString();
        });

        function iniJobTypeListString() {
            var desiredJobType = "";
            $(".JobTypeItem:checked").each(function () {
                desiredJobType += $(this).val() + ",";
            });
            $('#JobTypeListString').val(desiredJobType);
        }
    });
</script>
<div id="wrap">
    <div class="wrapContents">
        <h1>
            搜索人才库
        </h1>
        <div class="condition">
            <div class="zwms_title">
                高级搜索
            </div>
            <div class="condition_box">
                <p>
                    <label>
                        工作经历：
                    </label>@Html.TextBoxFor(x => x.Description, new { @class = "experience" })
                </p>
                <p>
                    <label>
                        年龄：
                    </label>@Html.DropDownListFor(model => model.MinAge, Model.AgeList, "不限", new { @class = "age" })
                    - @Html.DropDownListFor(model => model.MaxAge, Model.AgeList, "不限", new { @class = "age" })
                </p>
                <p>
                    <label>
                        工作经验：
                    </label>@Html.DropDownListFor(x => x.YearsOfExperience, Model.YearsOfExperienceList, "不限", new { @class = "handson" })
                </p>
                <p>
                    <label>
                        性别：
                    </label><input type="radio" value="" name="gender" checked="checked" />
                    不限 &nbsp;
                    @foreach (var item in Model.GenderList)
                    {
                        @Html.RadioButtonFor(x => x.Gender, item.Value, new { @name = "gender" }) @item.Name @:&nbsp;
                    }
                </p>
                <p>
                    <label>
                        专业方向：
                    </label>@Html.DropDownListFor(x => x.Major, Model.MajorList, "不限", new { @class = "handson" })
                </p>
                <p>
                    <label>
                        学历：
                    </label>@Html.DropDownListFor(x => x.EducationLevel, Model.EducationLevelList, "不限", new { @class = "handson" })
                </p>
                <p>
                    <label>
                        期望行业：
                    </label>@Html.DropDownListFor(x => x.DesiredIndustry, Model.DesiredIndustryList, "不限", new { @class = "handson" })
                </p>
                <p>
                    <label>
                        期望月薪：
                    </label>@Html.DropDownListFor(x => x.DesiredSalary, Model.DesiredSalaryList, "不限", new { @class = "handson" })
                </p>
                <p>
                    <label>
                        求职性质：
                    </label>@Html.HiddenFor(x => x.JobTypeListString)
                    @foreach (var item in Model.DesiredJobTypeList)
                    {
                        <input type="checkbox" class="JobTypeItem" value="@item.Value" @(Model.JobTypeList != null && Model.JobTypeList.Contains(int.Parse(item.Value)) ? "checked" : "") /> @item.Text @:&nbsp;
                    }
                </p>
                <p>
                    <label>
                        简历刷新时间：
                    </label>@Html.DropDownListFor(x => x.DayRange, Model.DayRangeList, "不限", new { @class = "handson" })
                </p>
                <p>
                    <label>
                        简历编号：
                    </label>@Html.TextBoxFor(x => x.ReferenceNumber, new { @class = "ResumeNo" })
                </p>
                <p class="saving">
                    @if (actionName.Equals("AdvSearch"))
                    {
                        @Html.CheckBoxFor(x => x.IsSaveWhenSearch)@:保存为搜索器
                    }
                    else
                    {
                        @:搜索器名称
                    }
                    @Html.TextBoxFor(x => x.SearchName, new { id = "txtSearchName" })
                </p>
            </div>
        </div>
    </div>
</div>
